package com.prs.crm.report;

import java.text.SimpleDateFormat;
import java.util.Date;

public abstract class AbsUtils {
	public String getDate(){
		return new SimpleDateFormat("yyyy-MM-dd").format(new Date());
	}
	public String getTimes(){
		return new SimpleDateFormat("HH:mm:ss").format(new Date());
	}
	public String getYear(){
		String date = getDate();
		return date.substring(0, date.indexOf("-"));
	}
	public String getMonth(){
		return getDate().substring(5, 7);
	}
	public String getDay(){
		String date = getDate();
		return date.substring(date.lastIndexOf("-")+1, date.length());
	}
	public String getHour(){
		String times = getTimes();
		return times.substring(0,times.indexOf(":"));
	}
	public String getMinutes(){
		return getTimes().substring(3, 5);
	}
	public String getSeconds(){
		String times = getTimes();
		return times.substring(times.lastIndexOf(":")+1, times.length());
	}
	
}
